May-June, 2018, Mauro Alberti, alberti.m65@gmail.com
In [26]:
from pygsf.spatial.rasters.geotransform import *
In [27]:
gt1 = GeoTransform(1500, 3000, 10, 10)
In [28]:
gt1
Out[28]:
Forward and backward transformation examples
In [29]:
ijPixToxyGeogr(gt1, 0, 0)
Out[29]:
In [30]:
xyGeogrToijPix(gt1, 1500, 3000)
Out[30]:
In [31]:
ijPixToxyGeogr(gt1, 1, 1)
Out[31]:
In [32]:
xyGeogrToijPix(gt1, 1510, 2990)
Out[32]:
In [33]:
ijPixToxyGeogr(gt1, 10, 10)
Out[33]:
In [34]:
xyGeogrToijPix(gt1, 1600, 3100)
Out[34]:
In [35]:
X, Y = gtToxyCellCenters(
gt=gt1,
num_rows=10,
num_cols=5)
In [36]:
print(X)
In [37]:
print(Y)